home *** CD-ROM | disk | FTP | other *** search
Unknown | 1984-09-14 | 7.0 KB | [BLKS/M4TH] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [BLKS] |
macFileCreator | [M4TH] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| d2 d7 9b 87 5e 7a 9b 87 | 5e 7a 00 00 00 00 00 04 |....^z..|^z......|
|00000010| 00 0c 01 87 00 00 04 00 | 00 00 20 00 00 10 00 00 |........|.. .....|
|00000020| 00 01 01 87 06 50 52 4f | 47 20 31 00 00 00 00 00 |.....PRO|G 1.....|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 72 61 6d 65 4f 76 61 6c | 28 72 29 3b 0d 20 20 53 |rameOval|(r);. S|
|00000410| 65 74 52 65 63 74 28 72 | 2c 20 34 31 30 2c 20 35 |etRect(r|, 410, 5|
|00000420| 30 2c 20 34 35 30 2c 20 | 39 30 29 3b 20 20 20 20 |0, 450, |90); |
|00000430| 20 7b 43 6f 6d 70 6c 65 | 74 65 6c 79 20 69 6e 73 | {Comple|tely ins|
|00000440| 69 64 65 20 74 68 65 20 | 66 69 72 73 74 20 73 68 |ide the |first sh|
|00000450| 61 70 65 7d 0d 20 20 46 | 72 61 6d 65 52 6f 75 6e |ape}. F|rameRoun|
|00000460| 64 52 65 63 74 28 72 2c | 20 31 38 2c 20 31 38 29 |dRect(r,| 18, 18)|
|00000470| 3b 0d 20 20 43 6c 6f 73 | 65 52 67 6e 28 4d 79 5f |;. Clos|eRgn(My_|
|00000480| 52 67 6e 29 3b 0d 0d 20 | 20 55 73 65 5f 52 65 67 |Rgn);.. | Use_Reg|
|00000490| 69 6f 6e 3b 0d 20 20 44 | 72 61 77 57 6f 72 64 73 |ion;. D|rawWords|
|000004a0| 28 33 35 32 2c 20 30 29 | 3b 0d 20 65 6e 64 3b 0d |(352, 0)|;. end;.|
|000004b0| 0d 20 70 72 6f 63 65 64 | 75 72 65 20 44 6f 52 65 |. proced|ure DoRe|
|000004c0| 67 69 6f 6e 34 3b 0d 0d | 7b 20 52 65 67 69 6f 6e |gion4;..|{ Region|
|000004d0| 20 34 2e 20 54 68 69 73 | 20 63 72 65 61 74 65 73 | 4. This| creates|
|000004e0| 20 61 20 72 65 67 69 6f | 6e 20 77 68 69 63 68 20 | a regio|n which |
|000004f0| 73 68 6f 77 73 20 74 68 | 65 20 65 66 66 65 63 74 |shows th|e effect|
|00000500| 20 6f 66 20 7d 0d 7b 70 | 61 72 74 69 61 6c 6c 79 | of }.{p|artially|
|00000510| 20 6f 76 65 72 6c 61 70 | 70 69 6e 67 20 72 65 67 | overlap|ping reg|
|00000520| 69 6f 6e 20 61 72 65 61 | 73 2e 7d 0d 0d 20 20 76 |ion area|s.}.. v|
|00000530| 61 72 0d 20 20 20 72 20 | 3a 20 52 65 63 74 3b 0d |ar. r |: Rect;.|
|00000540| 0d 20 62 65 67 69 6e 0d | 20 20 43 6c 65 61 72 52 |. begin.| ClearR|
|00000550| 67 6e 3b 0d 20 20 4d 6f | 76 65 54 6f 28 34 30 2c |gn;. Mo|veTo(40,|
|00000560| 20 33 31 30 29 3b 0d 20 | 20 44 72 61 77 53 74 72 | 310);. | DrawStr|
|00000570| 69 6e 67 28 27 4f 76 65 | 72 6c 61 70 70 69 6e 67 |ing('Ove|rlapping|
|00000580| 27 29 3b 0d 0d 20 20 4f | 70 65 6e 52 67 6e 3b 0d |');.. O|penRgn;.|
|00000590| 20 20 53 65 74 52 65 63 | 74 28 72 2c 20 33 30 2c | SetRec|t(r, 30,|
|000005a0| 20 31 38 30 2c 20 31 33 | 30 2c 20 32 38 30 29 3b | 180, 13|0, 280);|
|000005b0| 0d 20 20 46 72 61 6d 65 | 4f 76 61 6c 28 72 29 3b |. Frame|Oval(r);|
|000005c0| 20 20 20 20 7b 20 44 72 | 61 77 20 61 20 73 69 6d | { Dr|aw a sim|
|000005d0| 70 6c 65 20 63 69 72 63 | 6c 65 20 7d 0d 20 20 53 |ple circ|le }. S|
|000005e0| 65 74 52 65 63 74 28 72 | 2c 20 35 2c 20 32 31 35 |etRect(r|, 5, 215|
|000005f0| 2c 20 31 35 35 2c 20 32 | 34 35 29 3b 0d 20 20 46 |, 155, 2|45);. F|
|00000600| 72 61 6d 65 52 65 63 74 | 28 72 29 3b 20 20 20 20 |rameRect|(r); |
|00000610| 7b 20 44 72 61 77 20 61 | 20 72 65 63 74 61 6e 67 |{ Draw a| rectang|
|00000620| 6c 65 20 6f 76 65 72 20 | 74 68 65 20 63 69 72 63 |le over |the circ|
|00000630| 6c 65 20 7d 0d 20 20 43 | 6c 6f 73 65 52 67 6e 28 |le }. C|loseRgn(|
|00000640| 4d 79 5f 52 67 6e 29 3b | 0d 0d 20 20 55 73 65 5f |My_Rgn);|.. Use_|
|00000650| 52 65 67 69 6f 6e 3b 0d | 20 20 44 72 61 77 57 6f |Region;.| DrawWo|
|00000660| 72 64 73 28 30 2c 20 31 | 34 39 29 3b 0d 20 65 6e |rds(0, 1|49);. en|
|00000670| 64 3b 0d 0d 20 70 72 6f | 63 65 64 75 72 65 20 44 |d;.. pro|cedure D|
|00000680| 6f 52 65 67 69 6f 6e 35 | 3b 0d 0d 7b 20 52 65 67 |oRegion5|;..{ Reg|
|00000690| 69 6f 6e 20 35 2e 20 52 | 65 67 69 6f 6e 73 20 64 |ion 5. R|egions d|
|000006a0| 6f 20 6e 6f 74 20 68 61 | 76 65 20 74 6f 20 62 65 |o not ha|ve to be|
|000006b0| 20 63 6f 6e 74 69 67 75 | 6f 75 73 2e 20 54 68 69 | contigu|ous. Thi|
|000006c0| 73 20 70 72 6f 63 65 64 | 75 72 65 20 63 72 65 61 |s proced|ure crea|
|000006d0| 74 65 73 7d 0d 7b 61 20 | 72 65 67 69 6f 6e 20 77 |tes}.{a |region w|
|000006e0| 69 74 68 20 74 68 72 65 | 65 20 73 65 70 61 72 61 |ith thre|e separa|
|000006f0| 74 65 20 61 72 65 61 73 | 2e 7d 0d 0d 20 20 76 61 |te areas|.}.. va|
|00000700| 72 0d 20 20 20 72 20 3a | 20 52 65 63 74 3b 0d 0d |r. r :| Rect;..|
|00000710| 20 62 65 67 69 6e 0d 20 | 20 43 6c 65 61 72 52 67 | begin. | ClearRg|
|00000720| 6e 3b 0d 20 20 4d 6f 76 | 65 54 6f 28 32 32 30 2c |n;. Mov|eTo(220,|
|00000730| 20 33 31 30 29 3b 0d 20 | 20 44 72 61 77 53 74 72 | 310);. | DrawStr|
|00000740| 69 6e 67 28 27 44 69 73 | 6a 6f 69 6e 74 20 41 72 |ing('Dis|joint Ar|
|00000750| 65 61 73 27 29 3b 0d 0d | 20 20 4f 70 65 6e 52 67 |eas');..| OpenRg|
|00000760| 6e 3b 0d 20 20 53 65 74 | 52 65 63 74 28 72 2c 20 |n;. Set|Rect(r, |
|00000770| 31 39 30 2c 20 31 36 30 | 2c 20 32 37 30 2c 20 32 |190, 160|, 270, 2|
|00000780| 33 30 29 3b 0d 20 20 46 | 72 61 6d 65 4f 76 61 6c |30);. F|rameOval|
|00000790| 28 72 29 3b 0d 20 20 53 | 65 74 52 65 63 74 28 72 |(r);. S|etRect(r|
|000007a0| 2c 20 32 38 30 2c 20 31 | 36 30 2c 20 33 34 30 2c |, 280, 1|60, 340,|
|000007b0| 20 32 34 30 29 3b 0d 20 | 20 46 72 61 6d 65 52 65 | 240);. | FrameRe|
|000007c0| 63 74 28 72 29 3b 0d 20 | 20 53 65 74 52 65 63 74 |ct(r);. | SetRect|
|000007d0| 28 72 2c 20 31 39 30 2c | 20 32 35 35 2c 20 33 34 |(r, 190,| 255, 34|
|000007e0| 30 2c 20 32 38 35 29 3b | 0d 20 20 46 72 61 6d 65 |0, 285);|. Frame|
|000007f0| 52 6f 75 6e 64 52 65 63 | 74 28 72 2c 20 31 38 2c |RoundRec|t(r, 18,|
|00000800| 20 31 38 29 3b 0d 0d 20 | 20 43 6c 6f 73 65 52 67 | 18);.. | CloseRg|
|00000810| 6e 28 4d 79 5f 52 67 6e | 29 3b 0d 20 20 55 73 65 |n(My_Rgn|);. Use|
|00000820| 5f 52 65 67 69 6f 6e 3b | 0d 20 20 44 72 61 77 57 |_Region;|. DrawW|
|00000830| 6f 72 64 73 28 31 37 36 | 2c 20 31 35 30 29 3b 0d |ords(176|, 150);.|
|00000840| 20 65 6e 64 3b 0d 0d 20 | 70 72 6f 63 65 64 75 72 | end;.. |procedur|
|00000850| 65 20 44 6f 52 65 67 69 | 6f 6e 36 3b 0d 0d 7b 20 |e DoRegi|on6;..{ |
|00000860| 52 65 67 69 6f 6e 20 36 | 2e 20 54 68 69 73 20 70 |Region 6|. This p|
|00000870| 72 6f 63 65 64 75 72 65 | 20 69 6c 6c 75 73 74 72 |rocedure| illustr|
|00000880| 61 74 65 73 20 74 68 65 | 20 65 66 66 65 63 74 20 |ates the| effect |
|00000890| 6f 66 20 63 6f 6e 74 69 | 6e 75 6f 75 73 20 63 6c |of conti|nuous cl|
|000008a0| 69 70 70 69 6e 67 7d 0d | 7b 61 73 73 6f 63 69 61 |ipping}.|{associa|
|000008b0| 74 65 64 20 77 69 74 68 | 20 61 6e 79 20 64 72 61 |ted with| any dra|
|000008c0| 77 69 6e 67 2c 20 65 76 | 65 6e 20 61 6e 69 6d 61 |wing, ev|en anima|
|000008d0| 74 69 6f 6e 2e 7d 0d 0d | 20 20 76 61 72 0d 20 20 |tion.}..| var. |
|000008e0| 20 72 20 3a 20 52 65 63 | 74 3b 0d 0d 20 20 70 72 | r : Rec|t;.. pr|
|000008f0| 6f 63 65 64 75 72 65 20 | 41 6e 69 6d 61 74 65 3b |ocedure |Animate;|
|00000900| 0d 0d 7b 20 41 6e 69 6d | 61 74 65 2c 20 63 61 6c |..{ Anim|ate, cal|
|00000910| 6c 65 64 20 6f 6e 6c 79 | 20 62 79 20 44 6f 52 65 |led only| by DoRe|
|00000920| 67 69 6f 6e 36 2c 20 62 | 6f 75 6e 63 65 73 20 61 |gion6, b|ounces a|
|00000930| 20 62 61 6c 6c 20 69 6e | 20 74 68 65 20 67 65 6e | ball in| the gen|
|00000940| 65 72 61 6c 20 61 72 65 | 61 7d 0d 7b 6f 66 20 72 |eral are|a}.{of r|
|00000950| 65 67 69 6f 6e 20 36 2c | 20 73 68 6f 77 69 6e 67 |egion 6,| showing|
|00000960| 20 74 68 61 74 20 74 68 | 65 20 63 6c 69 70 70 69 | that th|e clippi|
|00000970| 6e 67 20 6f 63 63 75 72 | 73 20 63 6f 6e 73 74 61 |ng occur|s consta|
|00000980| 6e 74 6c 79 2c 20 77 69 | 74 68 20 6e 6f 77 20 6e |ntly, wi|th now n|
|00000990| 65 65 64 7d 0d 7b 66 6f | 72 20 73 70 65 63 69 61 |eed}.{fo|r specia|
|000009a0| 6c 20 69 6e 73 74 72 75 | 63 74 69 6f 6e 73 2e 20 |l instru|ctions. |
|000009b0| 54 68 65 20 61 6e 69 6d | 61 74 69 6f 6e 20 73 74 |The anim|ation st|
|000009c0| 6f 70 73 20 77 68 65 6e | 20 74 68 65 20 6d 6f 75 |ops when| the mou|
|000009d0| 73 65 20 62 75 74 74 6f | 6e 20 69 73 7d 0d 7b 70 |se butto|n is}.{p|
|000009e0| 72 65 73 73 65 64 2e 7d | 0d 0d 20 20 20 76 61 72 |ressed.}|.. var|
|000009f0| 0d 20 20 20 20 58 2c 20 | 59 2c 20 64 58 2c 20 64 |. X, |Y, dX, d|
|00000a00| 59 20 3a 20 69 6e 74 65 | 67 65 72 3b 0d 0d 20 20 |Y : inte|ger;.. |
|00000a10| 62 65 67 69 6e 0d 20 20 | 20 58 20 3a 3d 20 33 35 |begin. | X := 35|
|00000a20| 33 3b 20 20 7b 20 41 72 | 62 69 74 72 61 72 79 20 |3; { Ar|bitrary |
|00000a30| 73 74 61 72 74 69 6e 67 | 20 70 6f 73 69 74 69 6f |starting| positio|
|00000a40| 6e 2e 20 7d 0d 20 20 20 | 59 20 3a 3d 20 32 32 30 |n. }. |Y := 220|
|00000a50| 3b 0d 20 20 20 64 58 20 | 3a 3d 20 33 3b 20 20 20 |;. dX |:= 3; |
|00000a60| 20 7b 20 41 72 62 69 74 | 72 61 72 79 20 62 65 67 | { Arbit|rary beg|
|00000a70| 69 6e 6e 69 6e 67 20 76 | 65 6c 6f 63 69 74 79 2e |inning v|elocity.|
|00000a80| 20 7d 0d 20 20 20 64 59 | 20 3a 3d 20 30 3b 0d 20 | }. dY| := 0;. |
|00000a90| 20 20 72 65 70 65 61 74 | 0d 20 20 20 20 50 65 6e | repeat|. Pen|
|00000aa0| 50 61 74 28 77 68 69 74 | 65 29 3b 20 20 20 20 7b |Pat(whit|e); {|
|00000ab0| 20 55 73 65 20 77 68 69 | 74 65 20 66 6f 72 20 64 | Use whi|te for d|
|00000ac0| 72 61 77 69 6e 67 20 74 | 6f 20 7d 0d 20 20 20 20 |rawing t|o }. |
|00000ad0| 50 61 69 6e 74 43 69 72 | 63 6c 65 28 58 2c 20 59 |PaintCir|cle(X, Y|
|00000ae0| 2c 20 35 29 3b 20 20 7b | 20 65 72 61 73 65 20 62 |, 5); {| erase b|
|00000af0| 61 6c 6c 20 61 74 20 63 | 75 72 72 65 6e 74 20 70 |all at c|urrent p|
|00000b00| 6f 73 69 74 69 6f 6e 20 | 7d 0d 20 20 20 20 58 20 |osition |}. X |
|00000b10| 3a 3d 20 58 20 2b 20 64 | 58 3b 20 20 7b 20 75 70 |:= X + d|X; { up|
|00000b20| 67 72 61 64 65 20 70 6f | 73 69 74 69 6f 6e 20 7d |grade po|sition }|
|00000b30| 0d 20 20 20 20 59 20 3a | 3d 20 59 20 2b 20 64 59 |. Y :|= Y + dY|
|00000b40| 3b 0d 20 20 20 20 69 66 | 20 28 58 20 3c 20 33 35 |;. if| (X < 35|
|00000b50| 33 29 20 6f 72 20 28 58 | 20 3e 20 35 31 30 29 20 |3) or (X| > 510) |
|00000b60| 6f 72 20 28 59 20 3c 20 | 31 37 35 29 20 6f 72 20 |or (Y < |175) or |
|00000b70| 28 79 20 3e 20 32 36 35 | 29 20 74 68 65 6e 0d 20 |(y > 265|) then. |
|00000b80| 20 20 20 20 62 65 67 69 | 6e 20 20 7b 20 54 68 65 | begi|n { The|
|00000b90| 20 62 61 6c 6c 20 68 61 | 73 20 68 69 74 20 61 20 | ball ha|s hit a |
|00000ba0| 22 77 61 6c 6c 22 20 61 | 6e 64 20 73 68 6f 75 6c |"wall" a|nd shoul|
|00000bb0| 64 20 62 6f 75 6e 63 65 | 20 7d 0d 20 20 20 20 20 |d bounce| }. |
|00000bc0| 20 58 20 3a 3d 20 58 20 | 2d 20 64 58 3b 20 20 7b | X := X |- dX; {|
|00000bd0| 20 4d 6f 76 65 20 74 68 | 65 20 62 61 6c 6c 20 62 | Move th|e ball b|
|00000be0| 61 63 6b 20 74 6f 20 69 | 74 73 20 6c 61 73 74 20 |ack to i|ts last |
|00000bf0| 6c 65 67 61 6c 20 70 6f | 73 69 74 69 6f 6e 20 7d |legal po|sition }|
|00000c00| 0d 20 20 20 20 20 20 59 | 20 3a 3d 20 59 20 2d 20 |. Y| := Y - |
|00000c10| 64 59 3b 0d 20 20 20 20 | 20 20 72 65 70 65 61 74 |dY;. | repeat|
|00000c20| 0d 20 20 20 20 20 20 20 | 64 58 20 3a 3d 20 28 28 |. |dX := ((|
|00000c30| 72 61 6e 64 6f 6d 20 6d | 6f 64 20 33 29 20 2d 20 |random m|od 3) - |
|00000c40| 31 29 20 2a 20 37 3b 20 | 20 7b 20 43 68 6f 6f 73 |1) * 7; | { Choos|
|00000c50| 65 20 6e 65 77 20 72 61 | 6e 64 6f 6d 20 76 65 6c |e new ra|ndom vel|
|00000c60| 6f 63 69 74 69 65 73 2c | 7d 0d 20 20 20 20 20 20 |ocities,|}. |
|00000c70| 20 64 59 20 3a 3d 20 28 | 28 72 61 6e 64 6f 6d 20 | dY := (|(random |
|00000c80| 6d 6f 64 20 33 29 20 2d | 20 31 29 20 2a 20 37 3b |mod 3) -| 1) * 7;|
|00000c90| 20 7b 77 69 74 68 20 65 | 61 63 68 20 62 65 69 6e | {with e|ach bein|
|00000ca0| 67 20 2d 37 2c 30 2c 20 | 6f 72 20 37 20 7d 0d 20 |g -7,0, |or 7 }. |
|00000cb0| 20 20 20 20 20 75 6e 74 | 69 6c 20 28 64 58 20 3c | unt|il (dX <|
|00000cc0| 3e 20 30 29 20 6f 72 20 | 28 64 59 20 3c 3e 20 30 |> 0) or |(dY <> 0|
|00000cd0| 29 3b 20 7b 20 7a 65 72 | 6f 20 76 65 6c 6f 63 69 |); { zer|o veloci|
|00000ce0| 74 79 20 69 73 20 69 6c | 6c 65 67 61 6c 20 7d 0d |ty is il|legal }.|
|00000cf0| 20 20 20 20 20 65 6e 64 | 0d 20 20 20 20 65 6c 73 | end|. els|
|00000d00| 65 20 20 7b 20 6e 65 77 | 20 62 61 6c 6c 20 70 6f |e { new| ball po|
|00000d10| 73 69 74 69 6f 6e 20 69 | 73 20 6f 6b 61 79 2e 20 |sition i|s okay. |
|00000d20| 7d 0d 20 20 20 20 20 62 | 65 67 69 6e 0d 20 20 20 |}. b|egin. |
|00000d30| 20 20 20 50 65 6e 50 61 | 74 28 62 6c 61 63 6b 29 | PenPa|t(black)|
|00000d40| 3b 0d 20 20 20 20 20 20 | 50 61 69 6e 74 43 69 72 |;. |PaintCir|
|00000d50| 63 6c 65 28 58 2c 20 59 | 2c 20 35 29 3b 20 20 20 |cle(X, Y|, 5); |
|00000d60| 7b 20 44 72 61 77 20 74 | 68 65 20 62 61 6c 6c 20 |{ Draw t|he ball |
|00000d70| 69 6e 20 74 68 65 20 6e | 65 77 20 70 6f 73 69 74 |in the n|ew posit|
|00000d80| 69 6f 6e 20 7d 0d 20 20 | 20 20 20 65 6e 64 3b 0d |ion }. | end;.|
|00000d90| 20 20 20 75 6e 74 69 6c | 20 42 75 74 74 6f 6e 3b | until| Button;|
|00000da0| 20 20 20 20 7b 20 53 74 | 6f 70 20 77 68 65 6e 20 | { St|op when |
|00000db0| 74 68 65 20 62 75 74 74 | 6f 6e 20 69 73 20 70 72 |the butt|on is pr|
|00000dc0| 65 73 73 65 64 20 7d 0d | 20 20 65 6e 64 3b 0d 0d |essed }.| end;..|
|00000dd0| 20 62 65 67 69 6e 20 20 | 7b 20 52 65 67 69 6f 6e | begin |{ Region|
|00000de0| 36 20 7d 0d 20 20 43 6c | 65 61 72 52 67 6e 3b 0d |6 }. Cl|earRgn;.|
|00000df0| 20 20 53 65 74 52 65 63 | 74 28 72 2c 20 33 35 33 | SetRec|t(r, 353|
|00000e00| 2c 20 31 35 30 2c 20 35 | 33 30 2c 20 32 39 30 29 |, 150, 5|30, 290)|
|00000e10| 3b 0d 20 20 46 69 6c 6c | 52 65 63 74 28 72 2c 20 |;. Fill|Rect(r, |
|00000e20| 67 72 61 79 29 3b 20 20 | 20 20 7b 20 55 73 65 20 |gray); | { Use |
|00000e30| 61 20 67 72 61 79 20 62 | 61 63 6b 67 72 6f 75 6e |a gray b|ackgroun|
|00000e40| 64 20 66 6f 72 20 63 6f | 6e 74 72 61 73 74 20 7d |d for co|ntrast }|
|00000e50| 0d 20 20 4d 6f 76 65 54 | 6f 28 33 37 35 2c 20 33 |. MoveT|o(375, 3|
|00000e60| 31 30 29 3b 0d 20 20 44 | 72 61 77 53 74 72 69 6e |10);. D|rawStrin|
|00000e70| 67 28 27 43 6f 6e 74 69 | 6e 75 6f 75 73 20 43 6c |g('Conti|nuous Cl|
|00000e80| 69 70 70 69 6e 67 27 29 | 3b 0d 0d 20 20 4f 70 65 |ipping')|;.. Ope|
|00000e90| 6e 52 67 6e 3b 0d 20 20 | 53 65 74 52 65 63 74 28 |nRgn;. |SetRect(|
|00000ea0| 72 2c 20 33 35 37 2c 20 | 31 38 35 2c 20 34 33 32 |r, 357, |185, 432|
|00000eb0| 2c 20 32 35 35 29 3b 0d | 20 20 46 72 61 6d 65 4f |, 255);.| FrameO|
|00000ec0| 76 61 6c 28 72 29 3b 0d | 20 20 53 65 74 52 65 63 |val(r);.| SetRec|
|00000ed0| 74 28 72 2c 20 34 33 32 | 2c 20 31 38 35 2c 20 35 |t(r, 432|, 185, 5|
|00000ee0| 30 37 2c 20 32 35 35 29 | 3b 0d 20 20 46 72 61 6d |07, 255)|;. Fram|
|00000ef0| 65 4f 76 61 6c 28 72 29 | 3b 0d 20 20 43 6c 6f 73 |eOval(r)|;. Clos|
|00000f00| 65 52 67 6e 28 4d 79 5f | 52 67 6e 29 3b 0d 0d 20 |eRgn(My_|Rgn);.. |
|00000f10| 20 55 73 65 5f 52 65 67 | 69 6f 6e 3b 0d 20 20 53 | Use_Reg|ion;. S|
|00000f20| 65 74 52 65 63 74 28 72 | 2c 20 33 35 33 2c 20 31 |etRect(r|, 353, 1|
|00000f30| 35 30 2c 20 35 33 30 2c | 20 32 39 30 29 3b 0d 20 |50, 530,| 290);. |
|00000f40| 20 46 69 6c 6c 52 65 63 | 74 28 72 2c 20 77 68 69 | FillRec|t(r, whi|
|00000f50| 74 65 29 3b 20 20 20 7b | 20 45 72 61 73 65 20 74 |te); {| Erase t|
|00000f60| 68 65 20 69 6e 73 69 64 | 65 20 6f 66 20 74 68 65 |he insid|e of the|
|00000f70| 20 72 65 67 69 6f 6e 2c | 20 75 73 69 6e 67 20 61 | region,| using a|
|00000f80| 75 74 6f 2d 63 6c 69 70 | 70 69 6e 67 7d 0d 20 20 |uto-clip|ping}. |
|00000f90| 41 6e 69 6d 61 74 65 3b | 20 20 7b 20 44 6f 20 74 |Animate;| { Do t|
|00000fa0| 68 65 20 62 6f 75 6e 63 | 69 6e 67 20 62 61 6c 6c |he bounc|ing ball|
|00000fb0| 20 7d 0d 20 65 6e 64 3b | 0d 0d 20 70 72 6f 63 65 | }. end;|.. proce|
|00000fc0| 64 75 72 65 20 4d 61 6b | 65 52 67 6e 73 3b 0d 0d |dure Mak|eRgns;..|
|00000fd0| 7b 20 54 68 69 73 20 69 | 73 20 61 20 62 72 75 74 |{ This i|s a brut|
|00000fe0| 65 20 66 6f 72 63 65 20 | 77 61 79 20 74 6f 20 63 |e force |way to c|
|00000ff0| 61 6c 6c 20 61 6c 6c 20 | 73 69 78 20 72 65 67 69 |all all |six regi|
|00001000| d2 d7 9b 87 5e 7a 9b 87 | 5e 7a 00 00 00 00 00 04 |....^z..|^z......|
|00001010| 00 0c 01 87 00 00 04 00 | 00 00 20 00 00 10 00 00 |........|.. .....|
|00001020| 00 01 01 87 06 50 52 4f | 47 20 31 00 00 00 00 00 |.....PRO|G 1.....|
|00001030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001080| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001400| 72 61 6d 65 4f 76 61 6c | 28 72 29 3b 0d 20 20 53 |rameOval|(r);. S|
|00001410| 65 74 52 65 63 74 28 72 | 2c 20 34 31 30 2c 20 35 |etRect(r|, 410, 5|
|00001420| 30 2c 20 34 35 30 2c 20 | 39 30 29 3b 20 20 20 20 |0, 450, |90); |
|00001430| 20 7b 43 6f 6d 70 6c 65 | 74 65 6c 79 20 69 6e 73 | {Comple|tely ins|
|00001440| 69 64 65 20 74 68 65 20 | 66 69 72 73 74 20 73 68 |ide the |first sh|
|00001450| 61 70 65 7d 0d 20 20 46 | 72 61 6d 65 52 6f 75 6e |ape}. F|rameRoun|
|00001460| 64 52 65 63 74 28 72 2c | 20 31 38 2c 20 31 38 29 |dRect(r,| 18, 18)|
|00001470| 3b 0d 20 20 43 6c 6f 73 | 65 52 67 6e 28 4d 79 5f |;. Clos|eRgn(My_|
|00001480| 52 67 6e 29 3b 0d 0d 20 | 20 55 73 65 5f 52 65 67 |Rgn);.. | Use_Reg|
|00001490| 69 6f 6e 3b 0d 20 20 44 | 72 61 77 57 6f 72 64 73 |ion;. D|rawWords|
|000014a0| 28 33 35 32 2c 20 30 29 | 3b 0d 20 65 6e 64 3b 0d |(352, 0)|;. end;.|
|000014b0| 0d 20 70 72 6f 63 65 64 | 75 72 65 20 44 6f 52 65 |. proced|ure DoRe|
|000014c0| 67 69 6f 6e 34 3b 0d 0d | 7b 20 52 65 67 69 6f 6e |gion4;..|{ Region|
|000014d0| 20 34 2e 20 54 68 69 73 | 20 63 72 65 61 74 65 73 | 4. This| creates|
|000014e0| 20 61 20 72 65 67 69 6f | 6e 20 77 68 69 63 68 20 | a regio|n which |
|000014f0| 73 68 6f 77 73 20 74 68 | 65 20 65 66 66 65 63 74 |shows th|e effect|
|00001500| 20 6f 66 20 7d 0d 7b 70 | 61 72 74 69 61 6c 6c 79 | of }.{p|artially|
|00001510| 20 6f 76 65 72 6c 61 70 | 70 69 6e 67 20 72 65 67 | overlap|ping reg|
|00001520| 69 6f 6e 20 61 72 65 61 | 73 2e 7d 0d 0d 20 20 76 |ion area|s.}.. v|
|00001530| 61 72 0d 20 20 20 72 20 | 3a 20 52 65 63 74 3b 0d |ar. r |: Rect;.|
|00001540| 0d 20 62 65 67 69 6e 0d | 20 20 43 6c 65 61 72 52 |. begin.| ClearR|
|00001550| 67 6e 3b 0d 20 20 4d 6f | 76 65 54 6f 28 34 30 2c |gn;. Mo|veTo(40,|
|00001560| 20 33 31 30 29 3b 0d 20 | 20 44 72 61 77 53 74 72 | 310);. | DrawStr|
|00001570| 69 6e 67 28 27 4f 76 65 | 72 6c 61 70 70 69 6e 67 |ing('Ove|rlapping|
|00001580| 27 29 3b 0d 0d 20 20 4f | 70 65 6e 52 67 6e 3b 0d |');.. O|penRgn;.|
|00001590| 20 20 53 65 74 52 65 63 | 74 28 72 2c 20 33 30 2c | SetRec|t(r, 30,|
|000015a0| 20 31 38 30 2c 20 31 33 | 30 2c 20 32 38 30 29 3b | 180, 13|0, 280);|
|000015b0| 0d 20 20 46 72 61 6d 65 | 4f 76 61 6c 28 72 29 3b |. Frame|Oval(r);|
|000015c0| 20 20 20 20 7b 20 44 72 | 61 77 20 61 20 73 69 6d | { Dr|aw a sim|
|000015d0| 70 6c 65 20 63 69 72 63 | 6c 65 20 7d 0d 20 20 53 |ple circ|le }. S|
|000015e0| 65 74 52 65 63 74 28 72 | 2c 20 35 2c 20 32 31 35 |etRect(r|, 5, 215|
|000015f0| 2c 20 31 35 35 2c 20 32 | 34 35 29 3b 0d 20 20 46 |, 155, 2|45);. F|
|00001600| 72 61 6d 65 52 65 63 74 | 28 72 29 3b 20 20 20 20 |rameRect|(r); |
|00001610| 7b 20 44 72 61 77 20 61 | 20 72 65 63 74 61 6e 67 |{ Draw a| rectang|
|00001620| 6c 65 20 6f 76 65 72 20 | 74 68 65 20 63 69 72 63 |le over |the circ|
|00001630| 6c 65 20 7d 0d 20 20 43 | 6c 6f 73 65 52 67 6e 28 |le }. C|loseRgn(|
|00001640| 4d 79 5f 52 67 6e 29 3b | 0d 0d 20 20 55 73 65 5f |My_Rgn);|.. Use_|
|00001650| 52 65 67 69 6f 6e 3b 0d | 20 20 44 72 61 77 57 6f |Region;.| DrawWo|
|00001660| 72 64 73 28 30 2c 20 31 | 34 39 29 3b 0d 20 65 6e |rds(0, 1|49);. en|
|00001670| 64 3b 0d 0d 20 70 72 6f | 63 65 64 75 72 65 20 44 |d;.. pro|cedure D|
|00001680| 6f 52 65 67 69 6f 6e 35 | 3b 0d 0d 7b 20 52 65 67 |oRegion5|;..{ Reg|
|00001690| 69 6f 6e 20 35 2e 20 52 | 65 67 69 6f 6e 73 20 64 |ion 5. R|egions d|
|000016a0| 6f 20 6e 6f 74 20 68 61 | 76 65 20 74 6f 20 62 65 |o not ha|ve to be|
|000016b0| 20 63 6f 6e 74 69 67 75 | 6f 75 73 2e 20 54 68 69 | contigu|ous. Thi|
|000016c0| 73 20 70 72 6f 63 65 64 | 75 72 65 20 63 72 65 61 |s proced|ure crea|
|000016d0| 74 65 73 7d 0d 7b 61 20 | 72 65 67 69 6f 6e 20 77 |tes}.{a |region w|
|000016e0| 69 74 68 20 74 68 72 65 | 65 20 73 65 70 61 72 61 |ith thre|e separa|
|000016f0| 74 65 20 61 72 65 61 73 | 2e 7d 0d 0d 20 20 76 61 |te areas|.}.. va|
|00001700| 72 0d 20 20 20 72 20 3a | 20 52 65 63 74 3b 0d 0d |r. r :| Rect;..|
|00001710| 20 62 65 67 69 6e 0d 20 | 20 43 6c 65 61 72 52 67 | begin. | ClearRg|
|00001720| 6e 3b 0d 20 20 4d 6f 76 | 65 54 6f 28 32 32 30 2c |n;. Mov|eTo(220,|
|00001730| 20 33 31 30 29 3b 0d 20 | 20 44 72 61 77 53 74 72 | 310);. | DrawStr|
|00001740| 69 6e 67 28 27 44 69 73 | 6a 6f 69 6e 74 20 41 72 |ing('Dis|joint Ar|
|00001750| 65 61 73 27 29 3b 0d 0d | 20 20 4f 70 65 6e 52 67 |eas');..| OpenRg|
|00001760| 6e 3b 0d 20 20 53 65 74 | 52 65 63 74 28 72 2c 20 |n;. Set|Rect(r, |
|00001770| 31 39 30 2c 20 31 36 30 | 2c 20 32 37 30 2c 20 32 |190, 160|, 270, 2|
|00001780| 33 30 29 3b 0d 20 20 46 | 72 61 6d 65 4f 76 61 6c |30);. F|rameOval|
|00001790| 28 72 29 3b 0d 20 20 53 | 65 74 52 65 63 74 28 72 |(r);. S|etRect(r|
|000017a0| 2c 20 32 38 30 2c 20 31 | 36 30 2c 20 33 34 30 2c |, 280, 1|60, 340,|
|000017b0| 20 32 34 30 29 3b 0d 20 | 20 46 72 61 6d 65 52 65 | 240);. | FrameRe|
|000017c0| 63 74 28 72 29 3b 0d 20 | 20 53 65 74 52 65 63 74 |ct(r);. | SetRect|
|000017d0| 28 72 2c 20 31 39 30 2c | 20 32 35 35 2c 20 33 34 |(r, 190,| 255, 34|
|000017e0| 30 2c 20 32 38 35 29 3b | 0d 20 20 46 72 61 6d 65 |0, 285);|. Frame|
|000017f0| 52 6f 75 6e 64 52 65 63 | 74 28 72 2c 20 31 38 2c |RoundRec|t(r, 18,|
|00001800| 20 31 38 29 3b 0d 0d 20 | 20 43 6c 6f 73 65 52 67 | 18);.. | CloseRg|
|00001810| 6e 28 4d 79 5f 52 67 6e | 29 3b 0d 20 20 55 73 65 |n(My_Rgn|);. Use|
|00001820| 5f 52 65 67 69 6f 6e 3b | 0d 20 20 44 72 61 77 57 |_Region;|. DrawW|
|00001830| 6f 72 64 73 28 31 37 36 | 2c 20 31 35 30 29 3b 0d |ords(176|, 150);.|
|00001840| 20 65 6e 64 3b 0d 0d 20 | 70 72 6f 63 65 64 75 72 | end;.. |procedur|
|00001850| 65 20 44 6f 52 65 67 69 | 6f 6e 36 3b 0d 0d 7b 20 |e DoRegi|on6;..{ |
|00001860| 52 65 67 69 6f 6e 20 36 | 2e 20 54 68 69 73 20 70 |Region 6|. This p|
|00001870| 72 6f 63 65 64 75 72 65 | 20 69 6c 6c 75 73 74 72 |rocedure| illustr|
|00001880| 61 74 65 73 20 74 68 65 | 20 65 66 66 65 63 74 20 |ates the| effect |
|00001890| 6f 66 20 63 6f 6e 74 69 | 6e 75 6f 75 73 20 63 6c |of conti|nuous cl|
|000018a0| 69 70 70 69 6e 67 7d 0d | 7b 61 73 73 6f 63 69 61 |ipping}.|{associa|
|000018b0| 74 65 64 20 77 69 74 68 | 20 61 6e 79 20 64 72 61 |ted with| any dra|
|000018c0| 77 69 6e 67 2c 20 65 76 | 65 6e 20 61 6e 69 6d 61 |wing, ev|en anima|
|000018d0| 74 69 6f 6e 2e 7d 0d 0d | 20 20 76 61 72 0d 20 20 |tion.}..| var. |
|000018e0| 20 72 20 3a 20 52 65 63 | 74 3b 0d 0d 20 20 70 72 | r : Rec|t;.. pr|
|000018f0| 6f 63 65 64 75 72 65 20 | 41 6e 69 6d 61 74 65 3b |ocedure |Animate;|
|00001900| 0d 0d 7b 20 41 6e 69 6d | 61 74 65 2c 20 63 61 6c |..{ Anim|ate, cal|
|00001910| 6c 65 64 20 6f 6e 6c 79 | 20 62 79 20 44 6f 52 65 |led only| by DoRe|
|00001920| 67 69 6f 6e 36 2c 20 62 | 6f 75 6e 63 65 73 20 61 |gion6, b|ounces a|
|00001930| 20 62 61 6c 6c 20 69 6e | 20 74 68 65 20 67 65 6e | ball in| the gen|
|00001940| 65 72 61 6c 20 61 72 65 | 61 7d 0d 7b 6f 66 20 72 |eral are|a}.{of r|
|00001950| 65 67 69 6f 6e 20 36 2c | 20 73 68 6f 77 69 6e 67 |egion 6,| showing|
|00001960| 20 74 68 61 74 20 74 68 | 65 20 63 6c 69 70 70 69 | that th|e clippi|
|00001970| 6e 67 20 6f 63 63 75 72 | 73 20 63 6f 6e 73 74 61 |ng occur|s consta|
|00001980| 6e 74 6c 79 2c 20 77 69 | 74 68 20 6e 6f 77 20 6e |ntly, wi|th now n|
|00001990| 65 65 64 7d 0d 7b 66 6f | 72 20 73 70 65 63 69 61 |eed}.{fo|r specia|
|000019a0| 6c 20 69 6e 73 74 72 75 | 63 74 69 6f 6e 73 2e 20 |l instru|ctions. |
|000019b0| 54 68 65 20 61 6e 69 6d | 61 74 69 6f 6e 20 73 74 |The anim|ation st|
|000019c0| 6f 70 73 20 77 68 65 6e | 20 74 68 65 20 6d 6f 75 |ops when| the mou|
|000019d0| 73 65 20 62 75 74 74 6f | 6e 20 69 73 7d 0d 7b 70 |se butto|n is}.{p|
|000019e0| 72 65 73 73 65 64 2e 7d | 0d 0d 20 20 20 76 61 72 |ressed.}|.. var|
|000019f0| 0d 20 20 20 20 58 2c 20 | 59 2c 20 64 58 2c 20 64 |. X, |Y, dX, d|
|00001a00| 59 20 3a 20 69 6e 74 65 | 67 65 72 3b 0d 0d 20 20 |Y : inte|ger;.. |
|00001a10| 62 65 67 69 6e 0d 20 20 | 20 58 20 3a 3d 20 33 35 |begin. | X := 35|
|00001a20| 33 3b 20 20 7b 20 41 72 | 62 69 74 72 61 72 79 20 |3; { Ar|bitrary |
|00001a30| 73 74 61 72 74 69 6e 67 | 20 70 6f 73 69 74 69 6f |starting| positio|
|00001a40| 6e 2e 20 7d 0d 20 20 20 | 59 20 3a 3d 20 32 32 30 |n. }. |Y := 220|
|00001a50| 3b 0d 20 20 20 64 58 20 | 3a 3d 20 33 3b 20 20 20 |;. dX |:= 3; |
|00001a60| 20 7b 20 41 72 62 69 74 | 72 61 72 79 20 62 65 67 | { Arbit|rary beg|
|00001a70| 69 6e 6e 69 6e 67 20 76 | 65 6c 6f 63 69 74 79 2e |inning v|elocity.|
|00001a80| 20 7d 0d 20 20 20 64 59 | 20 3a 3d 20 30 3b 0d 20 | }. dY| := 0;. |
|00001a90| 20 20 72 65 70 65 61 74 | 0d 20 20 20 20 50 65 6e | repeat|. Pen|
|00001aa0| 50 61 74 28 77 68 69 74 | 65 29 3b 20 20 20 20 7b |Pat(whit|e); {|
|00001ab0| 20 55 73 65 20 77 68 69 | 74 65 20 66 6f 72 20 64 | Use whi|te for d|
|00001ac0| 72 61 77 69 6e 67 20 74 | 6f 20 7d 0d 20 20 20 20 |rawing t|o }. |
|00001ad0| 50 61 69 6e 74 43 69 72 | 63 6c 65 28 58 2c 20 59 |PaintCir|cle(X, Y|
|00001ae0| 2c 20 35 29 3b 20 20 7b | 20 65 72 61 73 65 20 62 |, 5); {| erase b|
|00001af0| 61 6c 6c 20 61 74 20 63 | 75 72 72 65 6e 74 20 70 |all at c|urrent p|
|00001b00| 6f 73 69 74 69 6f 6e 20 | 7d 0d 20 20 20 20 58 20 |osition |}. X |
|00001b10| 3a 3d 20 58 20 2b 20 64 | 58 3b 20 20 7b 20 75 70 |:= X + d|X; { up|
|00001b20| 67 72 61 64 65 20 70 6f | 73 69 74 69 6f 6e 20 7d |grade po|sition }|
|00001b30| 0d 20 20 20 20 59 20 3a | 3d 20 59 20 2b 20 64 59 |. Y :|= Y + dY|
|00001b40| 3b 0d 20 20 20 20 69 66 | 20 28 58 20 3c 20 33 35 |;. if| (X < 35|
|00001b50| 33 29 20 6f 72 20 28 58 | 20 3e 20 35 31 30 29 20 |3) or (X| > 510) |
|00001b60| 6f 72 20 28 59 20 3c 20 | 31 37 35 29 20 6f 72 20 |or (Y < |175) or |
|00001b70| 28 79 20 3e 20 32 36 35 | 29 20 74 68 65 6e 0d 20 |(y > 265|) then. |
|00001b80| 20 20 20 20 62 65 67 69 | 6e 20 20 7b 20 54 68 65 | begi|n { The|
|00001b90| 20 62 61 6c 6c 20 68 61 | 73 20 68 69 74 20 61 20 | ball ha|s hit a |
|00001ba0| 22 77 61 6c 6c 22 20 61 | 6e 64 20 73 68 6f 75 6c |"wall" a|nd shoul|
|00001bb0| 64 20 62 6f 75 6e 63 65 | 20 7d 0d 20 20 20 20 20 |d bounce| }. |
|00001bc0| 20 58 20 3a 3d 20 58 20 | 2d 20 64 58 3b 20 20 7b | X := X |- dX; {|
|00001bd0| 20 4d 6f 76 65 20 74 68 | 65 20 62 61 6c 6c 20 62 | Move th|e ball b|
|00001be0| 61 63 6b 20 74 6f 20 69 | 74 73 20 6c 61 73 74 20 |ack to i|ts last |
|00001bf0| 6c 65 67 61 6c 20 70 6f | 73 69 74 69 6f 6e 20 7d |legal po|sition }|
+--------+-------------------------+-------------------------+--------+--------+